package 集合;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;

public class CollectionAdd {
	public static void main(String[] args) {
		Collection<Integer> collection = new ArrayList<>(Arrays.asList(1, 2, 3, 3, 4));
		Integer[] moreInt = {5, 6, 7, 8};
		Collections.addAll(Arrays.asList(moreInt));
		Collections.addAll(collection, moreInt);
		Collections.addAll(collection, 12, 13, 14, 15);

	}

	void addOne(Collection<Integer> collection) {
		collection.add(1);
	}

	void addAll(Collection<Integer> collection, Collection<Integer> collection2) {
		collection.addAll(collection2);
		Collections.addAll(collection2, 1, 2, 3);
	}
}
